home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / Format / p2flatten / flatten_only.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  1.0 KB  |  48 lines

  1. /* flatten_alone: standalone flatten a P2 directory structure into a message again */
  2.  
  3. # ifndef lint
  4. static char Rcsid[] = "@(#)$Header: /xtel/pp/pp-beta/Format/p2flatten/RCS/flatten_only.c,v 6.0 1991/12/18 20:20:12 jpo Rel $";
  5. # endif
  6.  
  7. /*
  8.  * $Header: /xtel/pp/pp-beta/Format/p2flatten/RCS/flatten_only.c,v 6.0 1991/12/18 20:20:12 jpo Rel $
  9.  *
  10.  * $Log: flatten_only.c,v $
  11.  * Revision 6.0  1991/12/18  20:20:12  jpo
  12.  * Release 6.0
  13.  *
  14.  */
  15.  
  16.  
  17.  
  18. #include "retcode.h"
  19. #include "util.h"
  20.  
  21. static char *myname = "p2flatten_alone";
  22.  
  23. /*
  24.  * parameters -
  25.  * argv[0] = program name
  26.  * argv[1] = source directory
  27.  * argv[2] = destination directory
  28.  */
  29.  
  30. static int x40084;
  31.  
  32. main(argc, argv)
  33. int    argc;
  34. char    **argv;
  35. {
  36.     int result = OK;
  37.     if (isatty (fileno(stderr)))
  38.         ll_dbinit(pp_log_norm, argv[0]);
  39.     if (argc < 3)
  40.         err_abrt(RP_MECH, "Usage: %s src-dir dest-dir", argv[0]);
  41.     x40084 = FALSE;
  42.     if (argc == 4)
  43.         if (lexequ(argv[3], "-84") == 0)
  44.             x40084 = TRUE;
  45.     result = flatten(argv[1], argv[2], x40084);
  46.     printf("Flatten result was %s\n", (result == OK) ? "ok" : "notok");
  47. }
  48.